#ifndef __MAIN_FRAME_BUFFER_GLES_H__
#define __MAIN_FRAME_BUFFER_GLES_H__

#pragma once

#include "RenderTarget.h"

namespace Nezha
{

	class GLESAdaptor;

	class MainFrameBufferGLES : public RenderTarget
	{
	public:
		MainFrameBufferGLES(u8 bitDepth, u16 w, u16 h);
		~MainFrameBufferGLES();

		virtual void swapBuffers(bool waitVSync = true);

		virtual Texture* getRenderTexture(u32 index){ return NULL; }

	protected:
		virtual void _preDraw(Viewport* vp);

		virtual void _postDraw(Viewport* vp);

		// FIXME native depth-stencil buffer?

	private:
		GLESAdaptor* mAdaptor;
	};

}//end namespace Nezha

#endif //end __MAIN_FRAME_BUFFER_GLES_H__